package cn.cena.service.impl;

import cn.cena.doc.CourseDoc;
import cn.cena.repository.CourseElasticSearchRepository;
import cn.cena.service.ICourseSearchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional
public class CourseSearchServiceImpl implements ICourseSearchService {

    @Autowired
    private CourseElasticSearchRepository searchRepository;

    @Override
    public void courseOnline(CourseDoc doc) {
        searchRepository.save(doc);
    }
}
